home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / filutil / todo2.zip / TODO2.TXT < prev   
Text File  |  1993-08-20  |  21KB  |  430 lines

  1. (Comp.sys.handhelds)
  2. Item: 2605 by diamant@hpfcbig.SDE.HP.COM (John Diamant)
  3. Subj: Todo program
  4. Date: Tue Apr 02 1991
  5.  
  6. Description:  To-Do Reminder List
  7. Programmer:   David Cook - Cookware
  8. Modified:     John Diamant (modifications version 1.0)
  9.  
  10. This program is a generic list manager for the 48SX calculator.  It
  11. works not only on todo lists, but any other type of list you care to
  12. manage in the calculator (limited by memory of the calculator).
  13.  
  14. I'm not going to repeat most of the general announcements from the original
  15. posting as I'm including it at the bottom of this message.  Please note in
  16. particular the shareware notice in David's original comments.
  17.  
  18. Installation instructions are the same as the original (see David's note
  19. at the bottom if you don't know how to install an ASC format program).
  20. If you can't download via ASC and need a cleartext posting (translate
  21. code 3), let me know (email would be fine) and I'll post that as well.
  22. However, to avoid further delay, I'm posting this now in ASC format.
  23. If you use this new TODO version and like it, I'd like to hear from 
  24. you (especially if you're using the new features I added to it).  If anybody
  25. knows David Cook's email address, I'd like to get in touch with him
  26. to merge my changes into his master version.
  27.  
  28. The next response to this note will be a question I have regarding
  29. memory efficiency and PICT.  If I find out how to improve the memory
  30. efficiency, I'll probably post a modified version, so you'll have to decide
  31. whether you want to wait or download this version.  However, the lists you
  32. build with this version should work just fine for a more memory efficient
  33. version and I may be able to provide a simple patch (by the way, the 
  34. memory usage problem is not something I introduced with my changes but my
  35. increasing the width of the PICT made it more likely to occur).
  36.  
  37. To run the program, simply press the RUN button in the variables menu in
  38. the TODO directory (I use the following entry in my CST menu to start up the
  39. program:  { "LIST" << TODO RUN >> })
  40.  
  41. By the way, I have truncated the grocery list substantially from the 
  42. originalposting due to it's taking too much space.  If you want the full one,
  43. download
  44. the original posting.
  45.  
  46. The changes from David's version 1.0 are as follows:
  47.  
  48.    Made the OFF key turn the calculator off while in TODO (instead of BLUE
  49.         SHIFT [EXIT])
  50.    Made the [EDIT] menu key return the current text as the default value for
  51.         the new text (which also makes it easy to cancel an edit simply by
  52.         pressing ENTER without making any changes).
  53.    Made the program font-size independent (with a table for the font sizes 
  54. for
  55.         the 3 builtin available fonts) and provided a binding (+ and - keys)
  56.         for dynamically changing the size of the font while the program is
  57.         running.  I did this because the small font is good when you want
  58.         lots of data, but is hard on the eyes since it's all uppercase, so I
  59.         want different fonts at different times (depends on how wide the
  60.         data is I'm viewing.
  61.    Implemented horizontal scrolling (by character, 10 characters at a time,
  62.         and beginning and end of line).  I also increased the width of the
  63.         virtual screen (adjustable with a local variable in the TODO
  64.         directory).
  65.    LIST mode (choose which list to make active) has been extended to support
  66.         USE, NEW, and DEL menu buttons rather than requiring obscure
  67.         keystrokes for these functions.
  68.    Made LIST mode more robust (added beeps for incorrect keystrokes).
  69.    Deleting a list asks for confirmation (default is no).
  70.    Changed the keybinding for deleting an item from a list from DEL to
  71.         BLUE SHIFT DEL to avoid risk of accidental deletion.
  72.    The ATTN key is trapped via IFERR and appropriate cleanup is done
  73.         (note that I do not rely on Bill Wickes special version of IFERR --
  74.         the builtin was sufficient for my purpose -- to make sure the 
  75.         program cleaned up if I accidentally used ATTN instead of EXIT)
  76.    Disables clock display during program execution and restores initial
  77.         state of clock (displayed or not) on exit (even with ATTN key).
  78.    Made the function which create new lists do some error checking on legal
  79.         names (using "V" mode for INPUT).
  80.    Removed reordering of vars on exit to put RUN at beginning since I
  81.         run the program from CST and I don't want to pay the run-time cost
  82.         every time I exit to reorder the VARS menu.
  83.  
  84. > I'll post either when I get all the changes finished or I expect it to be
  85. > awhile before I get the rest done (I'll probably post in a couple of days).
  86.  
  87. Sorry it was more than a couple of days, but I think you'll be glad I waited
  88. as I did add some functionality almost each day I delayed posting.
  89.  
  90.  
  91. How To Use TODO (modified from David's original instructions)
  92. ---------------
  93.  
  94.   When the program begins to run, it will display six menu items assigned
  95. to the menu keys.  These six items are:
  96.  
  97.      LIST  -  Catalog of all lists OR create a new list OR delete a list
  98.      ADD   -  Adds a new item to the end of the list OR inserts a blank item
  99.      EDIT  -  Edits the text of an existing item
  100.      SORT  -  Sort any particular list
  101.      MARK  -  Marks an item OR Unmarks an item OR Unmarks all marked items
  102.      EXIT  -  Exits the program and returns you to the HOME directory
  103.  
  104. The following lists the available KEYSTROKES from the main menu level:
  105.  
  106. UP ARROW                - Scroll the current list towards the top - one item
  107. ORANGE SHIFT UP ARROW   - Move the current list toward the top - one page
  108. BLUE SHIFT UP ARROW     - Move the current list to the top
  109. DOWN ARROW              - Scroll the current list toward the bottom - one 
  110. item
  111. ORANGE SHIFT DOWN ARROW - Move the current list toward the bottom - one page
  112. BLUE SHIFT DOWN ARROW   - Move the current list to the bottom
  113. LEFT ARROW              - scroll the current list towards the left - one char
  114. ORANGE SHIFT LEFT ARROW - scroll the current list towards the left - 10 
  115. charsBLUE SHIFT LEFT ARROW      - scroll the current list to the left edge
  116. RIGHT ARROW             - scroll the current list towards the right - one char
  117. ORANGE SHIFT RIGHT ARROW- scroll the current list towards the right - 10 
  118. chars
  119. BLUE SHIFT RIGHT ARROW  - scroll the current list to the right edge
  120. BLUE SHIFT DEL          - Deletes the current item
  121. ORANGE SHIFT DEL (purge)- Deletes ALL marked items
  122. LIST (menu key)         - Get a catalog of all lists
  123. BLUE SHIFT LIST         - Enter the name for a brand new list (also 
  124. available                         in LIST environment as function key)
  125. ADD  (menu key)         - Add an item to the end of the current list
  126. BLUE SHIFT ADD          - Insert a blank line ABOVE the current item
  127. EDIT (menu key)         - Edit the text of the current line
  128. SORT                    - Sort the current list in alphabetical order
  129. MARK (menu key)         - Mark OR Unmark the current item
  130. BLUE SHIFT MARK         - Unmark ALL marked items
  131. ORANGE SHIFT MARK       - Same as MARK without the Startrek sound
  132. EXIT                    - Stop the program and return to the HOME directory
  133. BLUE SHIFT ON (OFF)     - Turn the calculate off (turning it on returns to
  134.                           TODO automatically with no delay)
  135. +                       - Increase font to next larger size
  136. -                       - Decrease font to next smaller size
  137.  
  138. KEYSTROKES available from LIST screen (entered via LIST menu key):
  139.  
  140. UP ARROW                - Scroll the current list towards the top - one item
  141. DOWN ARROW              - Scroll the current list toward the bottom - one 
  142. item
  143. USE (menu key)          - make top list on screen currently viewed list
  144. ENTER                   - same as USE
  145. NEW (menu key)          - Create new list (same as BLUE SHIFT LIST
  146. above)
  147. DEL (menu key)          - Delete top list on screen (will ask for
  148. confirmation)
  149. +                       - Increase font to next larger size
  150. -                       - Decrease font to next smaller size
  151.  
  152. Note the setting of PW below to change the width of your virtual screen.
  153. The one I posted is set to 200 but you might prefer 262 (2 screens)if
  154. you have sufficient memory.
  155.  
  156. New Internals (see the original posting for other internals):
  157.  
  158. Here is a brief listing of what the other routines do:
  159.  
  160. PW        - page width.  Number of pixels of width to make the PICT display.
  161.             The screen is 131 wide, so use no less than 131, but larger than
  162.             131 is required to get any horizontal scrolling.
  163. EXIT      - function used to clean up and exit (called from a few places)
  164. CHFONT    - takes delta for font number as argument and sets up CHARH,
  165.             CHARW, FONT, and H for selected font.  Values of 1, -1, and 0
  166.             are useful (increase font size by one, decrease font size by one,
  167.             and set up font attributes for initialization respectively)
  168. FNTATTR   - list containing font attributes (width and height in pixels) for
  169.             the 3 builtin fonts.  Note that the list is stored as a string
  170.             and converted on the fly to avoid it being seen by the TODO
  171. program
  172.             as a user-specified list.
  173. CHARH     - character height in pixels of currently selected font
  174. CHARW     - character width in pixels of currently selected font
  175. H         - number of items which can be displayed on one screen in
  176.             current font
  177. FONT      - number of currently selected font (used in ->GROB call)
  178.  
  179. Only PW should be changed by a user of the program.  The rest are only
  180. documented if you want to change the program.  They are managed internally.
  181.  
  182.  
  183. John Diamant
  184. Software Engineering Systems Division
  185. Hewlett Packard Co.             ARPA Internet: diamant@hpfclp.sde.hp.com
  186. Fort Collins, CO                UUCP:  {hpfcla,hplabs}!hpfclp!diamant
  187.  
  188. This code does not come with any warranty express or implied.  It's
  189. suitability for any purpose is not the responsibility of the authors.
  190. This response does not represent the official position of, or statement
  191. by, the Hewlett-Packard Company.  The above data is provided for
  192. informational purposes only.  Note that I'm just a 48SX user like you --
  193. I just happen to work for HP.  I do not work in the division that makes
  194. these calculators.
  195.  
  196. ---------------------- original (unmodified) announcement from David --------
  197. Program Id:   TODO
  198. Description:  To-Do Reminder List
  199. Programmer:   David Cook - Cookware
  200.  
  201. Welcome to Version 1.0 of TODO, a To-Do list reminder system.  This program
  202. was written for a friend of mine who refusedto buy a HP48SX unless it had
  203. a TODO program, scheduler (with calendar) and Rolodex (he would rather have
  204. a HP48SX instead of a Wizard etc.., but needed that functionality).  Since I
  205. already have a rolodex and calendar program for my 48SX I only needed to 
  206. provide this function.
  207.  
  208. Disclaimer:
  209.  
  210.   I have had my 48SX only about 3 months, so I am sure that this program can
  211. be written better, smaller and faster.  I would have used SYSEVAL statements,
  212. but was unsure about compatibility with other revisions (can anyone out 
  213. thereanswer this question?).  
  214.  
  215. Shareware Notice:
  216.  
  217.   Feel free to use this program and redistribute it.   I ask that if you
  218. redistribute the program, please keep it named TODO, and please keep the
  219. title screen intact.  If you make significant changes, please add you name
  220. to the title screen - but keep my name as well.  If you find this program
  221. invaluable, a $5 donation would be appreciated.  Send any money or comments
  222. to:   David Cook, RR #1 Box 351, Whitestown Indiana  46075  - Thank you!
  223.  
  224. Installing And Running TODO:
  225.  
  226.   The program can be found at the bottom of this post.  It is in ->ASC 
  227. formatand you will need ASC-> to unscramble it.  ASC-> is openly available 
  228. on this
  229. forum as well as the HP BBS.  (The ASC routines were written by Bill Wickes.)
  230. I'm sure that if you don't have them, an open letter to the NET would 
  231. producethem rather quickly!
  232.  
  233.   (1)  Cut the code at the bottom of the document, AFTER the CUT HERE line.
  234.        Remove the final CUT HERE line at the bottom.
  235.  
  236.   (2)  Send this file to your HP48SX, via the Serial Cable, into the file '
  237. TODO'
  238.  
  239.   (3)  Hit the TODO button (eg., place the contents of TODO on the command 
  240. line)
  241.  
  242.   (4)  Execute  ASC->  (which you already should have loaded, or load it now)
  243.  
  244.   (5)  Store the result back to 'TODO' - it will become a directory
  245.  
  246. Running...
  247.  
  248.   (6)  Simply enter the TODO directory and hit the RUN button which will be
  249.        the very first button you see.
  250.  
  251.        From here on out, simply follow (6) to run it.
  252.  
  253. Features:
  254.  
  255.      *  Unlimited number of lists - up to the memory of your machine
  256.      *  Unlimited size for the lists - up to the memory of your machine
  257.      *  Ability to scroll the lists by the line or page
  258.      *  Ability to jump to the beginning or end of any list
  259.      *  Ability to change lists via a catalog
  260.      *  Ability to create new lists or delete old lists
  261.      *  Ability to MARK and UNMARK items on the list
  262.      *  Ability to UNMARK ALL items on the list
  263.      *  Ability to delete any single item on the list
  264.      *  Ability to delete ALL MARKED items on the list
  265.      *  Ability to insert a new item anywhere in the list
  266.      *  Ability to sort any list of information
  267.  
  268.  
  269. GROCERY LIST
  270.  
  271.   I have created a large (though somewhat incomplete) grocery lists, as a
  272. default.  It is large so it does take a bit of time to compile the GROB.  
  273. Usethis list as an example list, and delete it if you need the memory or 
  274. find it
  275. unusable.
  276.      
  277. How To Use TODO
  278. ---------------
  279.  
  280.   When the program begins to run, it will display six menu items assigned
  281. to the menu keys.  These six items are:
  282.  
  283.      LIST  -  Catalog of all lists OR create a new list OR delete a list
  284.      ADD   -  Adds a new item to the end of the list OR inserts a blank item
  285.      EDIT  -  Edits the text of an existing item
  286.      SORT  -  Sort any particular list
  287.      MARK  -  Marks an item OR Unmarks an item OR Unmarks all marked items
  288.      EXIT  -  Exits the program and returns you to the HOME directory
  289.  
  290. The following lists the available KEYSTROKES from the main menu level:
  291.  
  292. UP ARROW                - Scroll the current list towards the top - one item
  293. ORANGE SHIFT UP ARROW   - Move the current list toward the top - one page
  294. BLUE SHIFT UP ARROW     - Move the current list to the top
  295. DOWN ARROW              - Scroll the current list toward the bottom - one 
  296. item
  297. ORANGE SHIFT DOWN ARROW - Move the current list toward the bottom - one page
  298. BLUE SHIFT DOWN ARROW   - Move the current list to the bottom
  299. DEL (keyboard key)      - Deletes the current item
  300. ORANGE SHIFT DEL (purge)- Deletes ALL marked items
  301. LIST (menu key)         - Get a catalog of all lists
  302. BLUE SHIFT LIST         - Enter the name for a brand new list
  303. ADD  (menu key)         - Add an item to the end of the current list
  304. BLUE SHIFT ADD          - Insert a blank line ABOVE the current item
  305. EDIT (menu key)         - Edit the text of the current line
  306. SORT                    - Sort the current list in alphabetical order
  307. MARK (menu key)         - Mark OR Unmark the current item
  308. BLUE SHIFT MARK         - Unmark ALL marked items
  309. ORANGE SHIFT MARK       - Same as MARK without the Startrek sound
  310. EXIT                    - Stop the program and return to the HOME directory
  311. BLUE SHIFT EXIT         - Turn the calculate off (turning it on returns to
  312.                           TODO automatically with no delay)
  313.  
  314.  
  315. Here are some general comments about a couple of the commands...
  316.  
  317. CURRENT ITEM
  318.  
  319. The current item (eg., the item you are going to MARK, UNMARK, DELETE etc..)
  320. is the one at the TOP OF THE DISPLAY.  To move an item into the current item
  321. area, simply scroll (UP/DOWN arrow) until it is the top item on the list.  
  322. This
  323. goes for catalog lists (LIST) as well.
  324.  
  325. LIST
  326.  
  327. When in LIST, all current lists in the current directory will be displayed, 
  328. in
  329. alphabetical order (eg., sorted).   WHILE you are in this mode, UP and DOWN
  330. arrow work (but PAGE UP and PAGE DOWN and GO TO TOP and GO TO END do not 
  331. work).
  332. The DEL keyboard key will DELETE a list completely from memory.
  333.  
  334. MARK
  335.  
  336. The MARK command allows you to place a marker next to items which you have
  337. completed (eg., check 'em off).  Hit MARK the first time to place the marker,
  338. Hit MARK a second time (on the same item) to unmark.  When you MARK or 
  339. UNMARKa 'startrek' type beep will occur to signify the mark.  If you do not 
  340. wish
  341. to hear the sound, hit ORANGE SHIFT MARK instead.  BLUE SHIFT MARK will 
  342. UNMARK
  343. ALL currently marked entries WITHOUT deleting them from the list.
  344.  
  345. DEL
  346.  
  347. The normal 48SX DEL key serves to DELETE the current item, when hit under
  348. the normal menu (when hit while in LIST, it deletes entire lists).  If you
  349. hit ORANGE SHIFT DEL, the program will delete ALL marked entries - useful
  350. for purging information you have already done.
  351.  
  352. STARTING UP
  353.  
  354. If you start the program, and the current list is not found by the program
  355. (eg., you deleted it from the operating system level), the LIST command will
  356. automatically be run by the program.  If the LIST command does not see any
  357. lists in memory, the BLUE SHIFT LIST command will automatically be run, 
  358. allowing
  359. you to create a new list.
  360.  
  361. OTHER KEYBOARD KEYS
  362.  
  363. If you hit an unknown key (eg., not known to the program), the program will
  364. issue a very low tone.  Try again!
  365.  
  366.  
  367. Internals:
  368.  
  369.   This posting is already too long to give you full details of the program.
  370. Feel free to rip it apart and improve it - just post it back!  One routine
  371. you will probably want to add to your 'favorites' list is the routine named
  372. R2D2.  This, standalone, routine takes a single number from the stack and
  373. makes your HP48SX sound like a device on Star Trek.  The best values, for
  374. the most convincing sound are the values 4 or 5.  Simply type
  375.  
  376.                                  5  R2D2  
  377.  
  378. for a demo.  The number indicates the length of time (eg., number of chirps)
  379. for the speaker to make).
  380.  
  381. Another routine you will find useful is the SORT routine.  To use SORT 
  382. independently of the program, simply place a LIST of STRINGS on Level 1 and
  383. run SORT.  This is NOT a bubble sort, but an insertion sort, and it only 
  384. takes
  385. as long to sort the data as it does to read the data one time (plus the 
  386. linear
  387. count to find the place to put the data).
  388.  
  389. Other items you will find useful, if reverse engineering the routines...  
  390. Thevariable 'DATA' contains the name of the current to-do list database.  
  391. Thesystem creates TEMPORARY variables (only will be seen if you abort the 
  392. program
  393. while it is running).  'W' contains a number which signifies which item is
  394. the current iten (1 - S).  'S' contains the total number of items in the 
  395. list.
  396. If you abort during a catalog, you will see CATTEMP which contains a list of
  397. all you to-do lists.   'W', 'S' and 'CATTEMP' are all deleted and rebuilt
  398. by the program.
  399.  
  400. Here is a brief listing of what the other routines do:
  401.  
  402. RUN       - Runs the TODO program
  403. SORT      - Sorts a LIST of STRINGS in level 1
  404. MON       - High speed GROB editor, used to turn a Mark ON
  405. MOFF      - High speed GROB editor, used to turn a Mark OFF
  406. INSTD     - INSerts a blank item into the ToDo list above the current item
  407. EDITD     - EDIts the current item of the current ToDo list
  408. NEWTD     - Creates a NEW ToDo list
  409. CATTD     - Handles the LIST command catalog of lists
  410. SEETD     - Displays the current list (does NOT build it)
  411. MAKTD     - Makes the GROB associated with the current list
  412. ADDTD     - Adds a new item to the END of the current list
  413. MARTD     - Handles Marking and Unmarking of the current item
  414. UNMTD     - Unmarks ALL marked items in the list
  415. WIPTD     - Deletes ALL marked items in the list
  416. DELTD     - Deletes the current item in the list
  417. R2D2      - Takes a repeat value from level 1 and issues StarTrek sounds
  418.  
  419. AGAIN... these routines should only be used for editing and changing the
  420. program.  Use the RUN routine to execute the program (just hit RUN) and the
  421. program will automatically issues these routines for you in responce to the
  422. menu keys you hit (as described above).  I provided the details above only
  423. for those who want to see how it runs!
  424.  
  425. ENJOY!!!!!
  426. --- rfmail 0.3.9
  427.  * Origin: Bonafido  Usenet <====> Fido Gateway.       (3:771/170.0)
  428. SEEN-BY: 771/110 170 180 
  429. FSC-Control: PATH: 771/110 
  430.